﻿
@{
    ViewBag.Title = "EmergencyTeamList";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}

@section css{
    <link href="~/Assets/css/lib/fileinput.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/bootstrap-datetimepicker.min.css" rel="stylesheet" />
}
<header id="topbar">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a>应急物资</a>
            </li>
            <li class="crumb-link">
                <a>应急物资</a>
            </li>
            <li class="crumb-trail">应急物资管理</li>
        </ol>
    </div>
</header>
<section id="content" class="animated fadeIn" ng-cloak ng-controller="EmergencyController" ng-init="SearchModel={};page='@(Request.QueryString["page"].IsEmpty() ? "1" : Request.QueryString["page"])';
     PageName='@Request.CurrentExecutionFilePath.Substring(Request.CurrentExecutionFilePath.LastIndexOf("/") + 1)';
     SearchModel={};
     GetEmergencySuppliesList(SearchModel,page);">
    <div class="panel">
        <div class="panel-heading panel-visible">
            <span class="panel-title">
                <span class="glyphicon glyphicon-cog hidden"></span>应急物资
            </span>
            <div class="widget-menu pull-right mr10">
                <div class="btn-group">
                    <a href="EmergencySuppliesAdd?page={{result.currentPage}}" class="btn btn-xs btn-primary  light ">
                        <i class="fa fa-plus"></i>添加应急物资
                    </a>
                </div>
            </div>
        </div>
        <div class="panel-body ">

            <table class="table table-bordered">
                <thead>
                    <tr class="bg-light">

                        <th>序号</th>
                        <th>厂区</th>
                        <th>应急物资</th>
                        <th>数量</th>
                        <th>单位</th>
                        <th>责任人</th>
                        <th>联系方式</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-show="SuppliesList.length==0 && !PageLoading">
                        <td colspan="12" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                    </tr>
                    <tr ng-repeat="x in SuppliesList">
                        <td>
                            <span ng-bind="$index+1"></span>
                        </td>
                        <td ng-bind="x.FactoryAreaName"></td>
                        <td ng-bind="x.SupplyName"></td>
                        <td ng-bind="x.Quantity"></td>
                        <td ng-bind="x.Unit"></td>
                        <td ng-bind="x.Responsible"></td>
                        <td ng-bind="x.Phone"></td>
                        <td>

                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

    </div>
    <div class="text-center" ng-show="SuppliesList!=null && SuppliesList.length>0">
        <ul class="pagination  justify-content-center">
            <li class="page-item"><a class="page-link" style="cursor:pointer;" ng-click="GetEmergencySuppliesList(SearchModel,1);">首页</a></li>
            <li class="page-item" ng-class="{'active':result.currentPage==page}" ng-repeat="page in result.pages"><a style="cursor:pointer;" ng-click="GetEmergencySuppliesList(SearchModel,page)" class="page-link" ng-bind="page"></a></li>
            <li class="page-item"><a class="page-link" style="cursor:pointer;" ng-click="GetEmergencySuppliesList(SearchModel,(result.currentPage + 1 > result.totalPage ? result.totalPage : result.currentPage + 1))">下一页</a></li>
            <li class="page-item"><a class="page-link" style="cursor:pointer;" ng-click="GetEmergencySuppliesList(SearchModel,result.totalPage);">尾页</a></li>
        </ul>
    </div>

    <div class="modal fade" id="mapModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" ng-init="AddModel.IsComplete='False';">
        <div class="modal-dialog" style="min-width:985px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h2 class="modal-title">添加</h2>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form">

                        <div class="form-group">
                            <label class="col-lg-2 control-label">处理节点：</label>
                            <div class="col-lg-8">
                                <input type="text" class="form-control" placeholder="处理节点..." ng-model="AddModel.NodeName">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">上报时间</label>
                            <div class="col-sm-8">
                                <datepicker id="startTime" option="datetimeOption" format="L HH:mm" ng-model="AddModel.DealTime"></datepicker>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">上报人</label>
                            <div class="col-lg-8">
                                <input type="text" class="form-control" placeholder="此处输入上报人..." ng-model="AddModel.DealUser">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label" for="textArea2">事件完成</label>
                            <div class="col-lg-8">
                                <select class="form-control" ng-model="AddModel.IsComplete">
                                    <option value="True">是</option>
                                    <option value="False">否</option>
                                </select>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" id="btn_close">关闭</button>
                    <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="AddEventDealFlow(AddModel);">确定</button>
                </div>
            </div>
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
</section>

@section Js{
    <script src="~/bussiness/js/pg/EmergencyPlan.js?v=@DateTime.Now.ToString("yyMMddHHmm")"></script>
    <script src="~/bussiness/js/libs/moment.min.js"></script>
    <script src="~/bussiness/js/libs/locales/date/zh-cn.js"></script>
    <script src="~/bussiness/js/libs/bootstrap-datetimepicker.min.js"></script>
    <script src="~/bussiness/js/libs/angularjs-datepicker.js"></script>
    <script src="~/bussiness/js/libs/fileinput.js"></script>
    <script src="~/bussiness/js/libs/zh.js"></script>
}


